package cn.stylefeng.guns.orderitem.entity;

import cn.stylefeng.guns.core.pojo.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * order_item
 *
 * @author aria
 * @date 2021/02/20 20:24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("order_item")
public class OrderItem extends BaseEntity {

    /**
     * 订单项号
     */
    @TableId(value = "item_id", type = IdType.AUTO)
    private Integer itemId;

    /**
     * 订单号
     */
    @TableField("order_id")
    private Integer orderId;

    /**
     * 商品编号
     */
    @TableField("goods_id")
    private Integer goodsId;

    /**
     * 商品图片
     */
    @TableField("goods_image")
    private String goodsImage;

    /**
     * 商品名称
     */
    @TableField("goods_name")
    private String goodsName;

    /**
     * 商品价格
     */
    @TableField("goods_price")
    private Double goodsPrice;

    /**
     * 商品说明文字描述
     */
    @TableField("desc_")
    private String desc;

    /**
     * 购买数量
     */
    @TableField("Item_num")
    private Integer itemNum;


    /**
     * 订单项
     */
    @TableField(exist = false)
    private List<OrderItem> items;

}
